package com.amigo.online.message.figen;


import com.amigo.online.common.core.response.Response;
import feign.Headers;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(name = "amigo-online-provider-user")
public interface UserFeignService {
    /**
     * 基于token获取用户信息
     * @param token
     * @return
     */
    @Headers({"ACCESS_TOKEN: {token}"})
    @RequestMapping(value = "/user/token/{token}", method = RequestMethod.GET)
    public ResponseEntity<Response> getUserInfoByToken(@PathVariable("token") String token);

    @RequestMapping(value = "/user/info/{id}", method = RequestMethod.GET)
    public ResponseEntity<Response> getUserInfoById(@PathVariable("id") Long id);

    @RequestMapping(value = "/user/mongo", method = RequestMethod.GET)
    public ResponseEntity<Response> getUserInfoFromMongo(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/follow/my/connect/user", method = RequestMethod.GET)
    public ResponseEntity<Response> findFollowStateByUserIdAndUserIds(@RequestParam("id") Long id, @RequestParam("ids") List<Long> userIds);

    @RequestMapping(value = "/follow/my/concern/video/{page}/{size}", method = RequestMethod.GET)
    public ResponseEntity<Response> getMyConcernVideos(@PathVariable("page") Integer page, @PathVariable("size") Integer size);

    @RequestMapping(value = "/user/info/watermark/{id}", method = RequestMethod.GET)
    public ResponseEntity<Response> getVideoWaterMarkUserInfoById(@PathVariable("id") long userid);

    @RequestMapping(value = "/user/info/videoUserInfo/{id}", method = RequestMethod.GET)
    public ResponseEntity<Response> getVideoUserInfoById(@PathVariable("id") long userid);

    @GetMapping(value = "/user/update/loginPath/{lng}/{lat}")
    public ResponseEntity<Response> loginPath(@PathVariable("lng") String lng, @PathVariable("lat") String lat);
}
